﻿
<!--
https://github.com/netnr
https://gitee.com/netnr
https://www.netnr.com
https://zme.ink
-->


<!DOCTYPE html>
<html>
<head>

    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel='shortcut icon' href='/favicon.ico' type='image/x-icon' />


    <title>彩票查询 脚本服务</title>

    <meta name="keywords" content="netnr NET牛人 彩票查询" />
    <meta name="description" content="Script Services 彩票查询" />

</head>
<body>
<link href='https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css' rel='stylesheet' />
<link href='https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css' rel='stylesheet' />
<script src='https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/jzjs@2.0.2/2.0.2/jz.min.js'></script>
<link href='https://cdn.jsdelivr.net/gh/netnr/cdn/libs/netnr-nav/1.1.2/netnrnav.css' rel='stylesheet' />
<script src='https://cdn.jsdelivr.net/gh/netnr/cdn/libs/netnr-nav/1.1.2/netnrnav.js' defer async></script>
        <link href="/css/global.css?v=NAI_hOr6ZSg5NjaPo94olMdf7kAXXyp9gYOiuK69lLE" rel="stylesheet" />
        <script src="/js/global.js?v=-UUx_lkaONxBXMxYH5RB2QtqMLBOuqV077SxjKI08E4"></script>
            <!--导航-->
            <button type="button" class="MenuToggle show-in-mobile btn btn-lg btn-warning ml-3 mt-3">
                <span class="fa fa-align-justify"></span>
            </button>
            <div class="netnrnav horizontal">
                <div class="netnrnav-wrapper">
                    <ul>
                        <li><a href="https://www.netnr.com" class="siteIcon"><img src="/favicon.ico" /> 首页</a></li>
                        <li><a href="https://www.netnr.com/gist/discover" title="代码片段"><span class="fa fa-fw fa-file-code-o"></span> Gist</a></li>
                        <li><a href="https://www.netnr.com/run/discover" title="在线运行代码"><span class="fa fa-fw fa-play"></span> Run</a></li>
                        <li><a href="https://www.netnr.com/doc" title="文档管理"><span class="fa fa-fw fa-book"></span> Doc</a></li>
                        <li><a href="https://www.netnr.com/draw/discover" title="绘制"><span class="fa fa-fw fa-paint-brush"></span> Draw</a></li>
                        <li><a href="/" title="ss.js.org"><span class="fa fa-fw fa-wrench"></span> 服务</a></li>
                        <li style="background-image: radial-gradient(ellipse, white, rgb(227, 248, 240))">
                            <!--标题-->
                                <a href='javascript:location.reload(false)' title="彩票查询">
                                    <svg class="titleicon"><use xlink:href="#lottery"></use></svg> &#x5F69;&#x7968;&#x67E5;&#x8BE2;
                                </a>
                        </li>
                        <li>
                            <a class="text-muted"><span class="fa fa-fw fa-ellipsis-h"></span></a>
                            <ul>
                                <li><a target="_blank" title="码云" href="https://gitee.com/netnr"><i class="fa fa-fw fa-git"></i> Gitee <sup><i class="fa small fa-external-link"></i></sup></a></li>
                                <li><a target="_blank" title="GitHub" href="https://github.com/netnr"><i class="fa fa-fw fa-github"></i> GitHub <sup><i class="fa small fa-external-link"></i></sup></a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        <div class="min300 mt-3">
            <style>
    #divlottery span {
        width: 25px;
        height: 25px;
        font-size: 14px;
        line-height: 25px;
        text-align: center;
        border-radius: 12px;
        display: inline-block;
        margin: 5px 10px 5px 0;
    }

    #divlottery .sp1 {
        color: white;
        background-color: #cc0000;
    }

    #divlottery .sp2 {
        color: white;
        background-color: #3074da;
    }
</style>

<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <form>
                <div class="input-group">
                    <span class="input-group-append">
                        <button class="btn btn-warning" type="button" id="btnSearch">彩票类型</button>
                    </span>
                    <div class="input-group-append">
                        <select class="custom-select" id="seLotteryType" name="code">
                            <option value="001">双色球</option>
                            <option value="110">七星彩</option>
                            <option value="003">七乐彩</option>
                            <option value="002">福彩3d</option>
                            <option value="113">大乐透</option>
                            <option value="108">排列3</option>
                            <option value="109">排列5</option>
                        </select>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div id="divlottery" class="row mt-3"></div>
</div>

<script>
    QueryLottery();
    $("#seLotteryType").change(QueryLottery);

    function QueryLottery() {
        ss.loading();

        ss.ajax({
            url: "http://cp.zgzcw.com/lottery/hisnumber.action?lotteryId=" + $("#seLotteryType").val() + "&issueLen=24",
            dataType: "json",
            success: function (data) {
                data = ss.datalocation(data);
                if (data.length) {
                    var htm = [];
                    $(data).each(function () {
                        var codes = (this.lotteryNumber || this.tryoutNumber).split('+'),
                            code1 = codes[0].split(','), spans1 = spans2 = '';
                        for (var k = 0; k < code1.length; k++) {
                            spans1 += '<span class="sp1">' + code1[k] + '</span>';
                        }

                        if (codes[1] != undefined) {
                            var code2 = codes[1].split(',');
                            for (var u = 0; u < code2.length; u++) {
                                spans2 += '<span class="sp2">' + code2[u] + '</span>';
                            }
                        }

                        htm.push(
                            '<div class="col-xl-3 col-md-4 col-sm-6 mt-2 mb-2"><div class="card card-secondary"><div class="py-2 px-2">'
                            + '<div class="et"><label class="h5 mr-2">' + this.lotteryExpect + '</label><small>' + (new Date(this.ernieDate)).toISOString().substr(0, 10) + '</small></div>'
                            + spans1 + spans2
                            + '</div></div></div>'
                        );
                    });
                    $("#divlottery").html(htm.join(''));
                }
            },
            error: function () {
                ss.loading(0);
                jz.msg("网络错误");
            },
            complete: function () {
                ss.loading(0);
            }
        })
    }

</script>
        </div>
            <a href="javascript:ss.toTop();" class="totop" title="返回顶部">ˆ</a>
</body>
</html>
